<ul class="nav-category-list">
    <?php
    if ($this->class['classArray']) {
        foreach ($this->class['classArray'] as $classKey => $classValue) {
            ?>
            <li class="nav-category-item <?php if ($classKey == 0) echo 'nav-category-item-first'; ?>">
                <div class="nav-category-content"> <a href="<?php echo $this->url('shop-class', ['action' => 'goodsList', 'id' => $classValue->getClassId()]); ?>" class="title"><?php echo $this->escapeHtml($classValue->getClassName()); ?></a>
                    <?php if(isset($this->class['subClassArray'][$classValue->getClassId()])) { ?>
                        <div class="links">
                            <?php foreach($this->class['subClassArray'][$classValue->getClassId()] as $subClassValue) { ?>
                                <a href="<?php echo $this->url('shop-class', ['action'=>'goodsList', 'id' => $subClassValue->getClassId()]); ?>"><?php echo $this->escapeHtml($subClassValue->getClassName()); ?></a>
                            <?php } ?>
                        </div>
                    <?php } ?>
                </div>
            </li>
        <?php } } ?>
</ul>